class Vue {
  constructor(option) {
    this.el = option.el;
    this.$data = option.data;
    this.$methods = option.methods;
    this.$mounted = option.mounted;
    this.$watch = option.watch


    // Object.keys(option.watch).forEach(key=> {
    //   const fn = option.watch[key]
    //   if(fn) {
    //     // fn.call(this, )
    //     new Watcher(this, key, fn)

    //   }

    // })


    new Observe(this, '$data')
    new Driver(this, '$data')
    new Compiler(this.el, this)
  }
}





// js 操作dom 元素事件

